﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Masterpage/QuanLy.Master" AutoEventWireup="true"
    CodeBehind="ThemNhanVien.aspx.cs" Inherits="DT5_Anh09110006_Hung09110044_Vu09110157.QuanLy.ThemNhanVien" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<title>Thêm Nhân Viên</title>
    <style type="text/css">
        .style1
        {
            width: 100px;
            padding-left: 20px;
            height: 30px;
        }
        .style2
        {
            width: auto;
            height: 30px;
        }
         #qlnv
        {
            background: url("../Image/menu_focus.png") no-repeat scroll transparent;
            color: #FFFFFF;
            left: -6px;
            padding: 19px 18px 19px 25px;
        }
    </style>
    <link rel="stylesheet" href="../Styles/jquery-ui.css" />
    <script src="../Scripts/jquery-1.8.3.js"></script>
    <script src="../Scripts/jquery-ui.js"></script>
    <script>
        $(function () {
            $("#txtNgaySinh").datepicker({
                changeMonth: true,
                changeYear: true,
                minDate: "-100Y",
                maxDate: "-10Y"
            });
        });
    </script>
    <script language="javascript" type="text/javascript"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <h1 style="padding-left: 40px">
        Trang Thêm Mới Nhân Viên</h1>
    <table style="margin: 10px 20px 10px 20px; width: 95%" cellpadding="10px">
        <tr>
            <td colspan="2">
                <asp:ValidationSummary ID="ValidationSummary1" ValidationGroup="ThemNhanVien" runat="server"
                    ForeColor="Red" />
            </td>
        </tr>
        <tr>
            <td>
                <asp:Panel ID="Panel1" runat="server" GroupingText="Thông tin chính">
                    <table style="margin-left: 20px" cellpadding="5px">
                        <tr>
                            <td class="style1">
                                Mã Nhân Viên:
                            </td>
                            <td class="style2">
                                <asp:TextBox ID="txtMaNV" runat="server" Width="200px" />
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ErrorMessage="Nhập mã nhân viên"
                                    ControlToValidate="txtMaNV" ValidationGroup="ThemNhanVien" Text="*" ForeColor="Red"></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td class="style1">
                                Họ và Tên:
                            </td>
                            <td class="style2">
                                <asp:TextBox ID="txtHoTenNV" runat="server" Width="200px" />
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ErrorMessage="Nhập họ tên nhân viên"
                                    ControlToValidate="txtHoTenNV" ValidationGroup="ThemNhanVien" Text="*" ForeColor="Red"></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td class="style1">
                                Ngày Sinh:
                            </td>
                            <td class="style2">
                                <input type="text" id="txtNgaySinh" style="width: 200px" name="txtNgaySinh" value="01/01/1991" />
                            </td>
                        </tr>
                        <tr>
                            <td class="style1">
                                Địa Chỉ:
                            </td>
                            <td class="style2">
                                <asp:TextBox ID="txtDiaChiNV" runat="server" Width="200px" />
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ErrorMessage="Nhập địa chỉ nhân viên"
                                    ControlToValidate="txtDiaChiNV" ValidationGroup="ThemNhanVien" Text="*" ForeColor="Red"></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td class="style1">
                                Giới Tính:
                            </td>
                            <td class="style2">
                                <asp:DropDownList ID="ddlGioiTinhHV" runat="server" Width="205px">
                                    <asp:ListItem>Nam</asp:ListItem>
                                    <asp:ListItem>Nữ</asp:ListItem>
                                </asp:DropDownList>
                            </td>
                        </tr>
                        <tr>
                            <td class="style1">
                                Chức Vụ:
                            </td>
                            <td class="style2">
                               <asp:DropDownList ID="ddlChucVu" runat="server" Width="205px">
                                    <asp:ListItem>Giảng Viên</asp:ListItem>
                                    <asp:ListItem>Giám Đốc</asp:ListItem>
                                    <asp:ListItem>Kế Toán</asp:ListItem>
                                    <asp:ListItem>Lao Công</asp:ListItem>
                                    <asp:ListItem>Bảo Vệ</asp:ListItem>
                                </asp:DropDownList>
                            </td>
                        </tr>
                        <tr>
                            <td class="style1">
                                Lương:
                            </td>
                            <td class="style2">
                                <asp:TextBox ID="txtLương" runat="server" Width="200px" />
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="Nhập lương nhân viên"
                                    ControlToValidate="txtLương" ValidationGroup="ThemNhanVien" Text="*" ForeColor="Red"></asp:RequiredFieldValidator>
                                <asp:CompareValidator ID="CompareValidator1" runat="server" 
                                    ControlToValidate="txtLương" ErrorMessage="Nhập lương không chính xác" ForeColor="Red" 
                                    Operator="DataTypeCheck" Type="Double" ValidationGroup="ThemNhanVien">*</asp:CompareValidator>
                            </td>
                        </tr>
                    </table>
                </asp:Panel>
            </td>
            <td>
                <asp:Panel ID="Panel2" runat="server" GroupingText="Thông tin phụ thêm">
                    <table style="margin-left: 20px" cellpadding="5px">
                        <tr>
                            <td class="style1">
                                Người Quản Lý:
                            </td>
                            <td class="style2">
                                <asp:DropDownList ID="ddlNguoiQuanLy" runat="server" Width="205px">
                                </asp:DropDownList>
                            </td>
                        </tr>
                        <tr>
                            <td class="style1">
                                Điện Thoại:
                            </td>
                            <td class="style2">
                                <asp:TextBox ID="txtDienThoaiNV" runat="server" Width="200px" />
                                <asp:RegularExpressionValidator ID="RegularExpressionValidator6" runat="server" ControlToValidate="txtDienThoaiNV"
                                    ErrorMessage="Điện thoại nhập không chính xác" ForeColor="Red" ValidationGroup="ThemNhanVien"
                                    ValidationExpression="0(\d{9})(\d{1})?" Text="*"></asp:RegularExpressionValidator>
                            </td>
                        </tr>
                        <tr>
                            <td class="style1">
                                CMND:
                            </td>
                            <td class="style2">
                                <asp:TextBox ID="txtCMNDNV" runat="server" Width="200px" />
                                <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ControlToValidate="txtCMNDNV"
                                    ErrorMessage="CMND nhập không chính xác" ForeColor="Red" ValidationGroup="ThemNhanVien"
                                    ValidationExpression="\d{9}" Text="*"></asp:RegularExpressionValidator>
                            </td>
                        </tr>
                        <tr>
                            <td class="style1">
                                Email:
                            </td>
                            <td class="style2">
                                <asp:TextBox ID="txtEmailNV" runat="server" Width="200px" />
                                <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" ControlToValidate="txtEmailNV"
                                    ErrorMessage="Email nhập không chính xác" ForeColor="Red" ValidationGroup="ThemNhanVien"
                                    ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*">*</asp:RegularExpressionValidator>
                            </td>
                        </tr>
                        <tr>
                            <td class="style1">
                            </td>
                            <td class="style2">
                                <asp:Button ID="btnThemNV" Text="Thêm" runat="server" Width="80px" ValidationGroup="ThemNhanVien"
                                    CssClass="btnThem" OnClick="btnThemNV_Click" />
                                &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;
                                <asp:Button ID="btnQuayLai" Text="Hủy" runat="server" Width="80px" OnClick="btnQuayLai_Click"
                                    CssClass="btnHuy" />
                            </td>
                        </tr>
                        <tr>
                            <td class="style1">
                            </td>
                            <td class="style2">
                            </td>
                        </tr>
                        <tr>
                            <td class="style1">
                            </td>
                            <td class="style2">
                            </td>
                        </tr>
                    </table>
                </asp:Panel>
            </td>
        </tr>
    </table>
</asp:Content>
